import { get, post } from '@/utils/request'
const BASE_URL = window.baseUrl.asset

// 分页查询
export function queryPageList(query) {
  return post(BASE_URL + '/assetsHost/list', query)
}
export function entityTree(id) {
  return get(BASE_URL + '/assetsOrg/treeselect', { id })
}

export function listAll(ids) {
  return get(BASE_URL + '/dictItems/listByTypes', { ids })
}

// 查询user
export function queryUserList(id) {
  return get(BASE_URL + '/assetsUser/list', { id })
}
export function addDatas(query) {
  return post(BASE_URL + '/assetsHost/add', query)
}

export function queryById(id) {
  return get(BASE_URL + '/assetsHost/detail', { id })
}
export function editDatas(query) {
  return post(BASE_URL + '/assetsHost/update', query)
}

export function deleteDatas(ids) {
  return get(BASE_URL + '/assetsHost/deleteBatch', { ids })
}

export function exportDatas(query) {
  return post(BASE_URL + '/assetsHost/export', query)
}
export function queryByOrder(query) {
  return get(BASE_URL + '/assetsHost/queryByOrder', query)
}

// 导出模板
export function importTemplate() {
  return post(BASE_URL + '/assetsHost/export')
}
// 导出数据

// 导入数据
export function importData(file) {
  return post(BASE_URL + '/assetsHost/importData', { file })
}
